<!DOCTYPE html>
<html lang="en">
<head>
    <title>接入微信JSSDKDemo</title>
    <base href="<%=basePath%>">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <style type="text/css">
        .button {
            margin: 10px;
            text-decoration: none;
            font: bold 1.5em 'Trebuchet MS', Arial, Helvetica;
            display: inline-block;
            text-align: center;
            color: #fff;
            border: 1px solid #9c9c9c;
            border: 1px solid rgba(0, 0, 0, 0.3);
            text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
            box-shadow: 0 0 .05em rgba(0, 0, 0, 0.4);
            -moz-box-shadow: 0 0 .05em rgba(0, 0, 0, 0.4);
            -webkit-box-shadow: 0 0 .05em rgba(0, 0, 0, 0.4);
        }

        .button-khaki {
            background: #A2B598;
            background: -webkit-gradient(linear, left top, left bottom, from(#BDD1B4),
            to(#A2B598));
            background: -moz-linear-gradient(-90deg, #BDD1B4, #A2B598);
            filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
            StartColorStr='#BDD1B4', EndColorStr='#A2B598');
        }

        ul {
            width: 100%;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            padding: 0px 10px;
        }

        li {
            font-family: 微软雅黑;
            color: white;
            margin: 8px;
            float: left;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
        }

        .footer {
            bottom: 0px;
            position: fixed;
        }
    </style>
    <head>
        <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport"/>
        <script src="js/jquery.js"></script>
        <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
        <script src="js/dateUtil.js"></script>
        <script type="text/javascript">
            $(function () {
                $.ajax({
                    //这里具体替换成自己的映射域名即可 wx/jsapi/ticket 固定写死
                    url:'http://zxshuai.imwork.net/wx/jsapi/ticket',
                    method:'GET',
                    async:false,
                    contentType:'application/json',
                    success:function (res) {
                        wx.config({
                            debug: true,
                            appId: res.appId,
                            timestamp: res.timestamp,
                            nonceStr: res.noncestr,
                            signature: res.signature,
                            jsApiList: [
                                'checkJsApi',
                                'chooseImage',
                                'closeWindow'
                            ]
                        });
                        //关闭窗口
                        $("#close").bind("click",function () {
                            setTimeout(function () {
                                wx.closeWindow();
                            },3000)
                        })
                    }
                })
            });
            wx.ready(function () {
                // 1 判断当前版本是否支持指定 JS 接口，支持批量判断
                // alert("1230k");
            });

            wx.error(function (res) {
                alert(res.errMsg);
            });

        </script>
    </head>
<body style="background-color: rgb(1,159,230);">
<div class="date-day" id="a">即将显示时间...</div>
<center>
    <input type="button" id="close" value="关闭窗口" class="button button-khaki"/>
</center>
<input id="appId" type="hidden" value="${sign.appId }"/>
<input id="url" type="hidden" value="${sign.url}"/>
<input id="tk" type="hidden" value="${sign.jsapi_ticket }"/>
<input id="nonceStr" type="hidden" value="${sign.nonceStr }"/>
<input id="timestamp" type="hidden" value="${sign.timestamp }"/>
<input id="signature" type="hidden" value="${sign.signature }"/>
<div class="footer">
    <ul>
        <li>你&nbsp;</li>
        <li>我&nbsp;</li>
        <li>之&nbsp;</li>
        <li>间&nbsp;</li>
        <li>微&nbsp;</li>
        <li>信&nbsp;</li>
        <li>连&nbsp;</li>
        <li>接&nbsp;</li>
    </ul>
</div>
</body>
</html>
